import {Hono} from "hono";
import {getArticleByTime} from "@/backend/services/article-service";

export const articleRouter = new Hono()
    .get("/new-plate/:minutes", async (c) => {
        const {minutes} = c.req.param();
        const arts = await getArticleByTime(parseInt(minutes) || 60 * 5);
        return c.json({data: arts})
    })